package util;

import java.util.HashMap;

public class ExceptionTracker {
	public static HashMap<String,String> _exceptionTracker = new HashMap<String,String>();

	public static void reset_exception_tracker()
	{
		_exceptionTracker = new HashMap<String,String>();
	}
	
	public static HashMap<String, String> get_exceptionTracker() {
		return _exceptionTracker;
	}

	public static void set_exceptionTracker(HashMap<String, String> exceptionTracker) {
		_exceptionTracker = exceptionTracker;
	}
	
	public static boolean isExceptionNotifiedByKey(String key)
	{
		try {
			return _exceptionTracker.containsKey(key);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			return false;
		}
	}
	
	public static boolean isExceptionNotifiedByValue(String value)
	{
		try {
			return _exceptionTracker.containsValue(value);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			return false;
		}
	}
	
	public static void setExceptionInTracker(String key, String value)
	{
		try
		{
			_exceptionTracker.put(key, value);
		}
		catch(Exception e){}
	}
}
